package com.ch.forum.schedule;

import com.ch.forum.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 自动发帖
 */
@Component
public class SendArticleSchedule {

    @Autowired
    private ArticleService articleService;

    public static final long FIX_TIME = 5000;

    /**
     * 1. fixedRate形式  每隔着多少执行
     * 2. cron形式
     */
    @Scheduled(fixedRate = FIX_TIME)
    public void run(){
//        articleService.sendPreArticle(1);
    }
}
